#include "styles.h"
#include "images.h"
#include "fonts.h"

#include "ui.h"
#include "screens.h"

//
// Style: style_main_bar_btu
//

void init_style_style_main_bar_btu_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_flex_grow(style, 1);
    lv_style_set_bg_grad_color(style, lv_color_hex(0xffff9900));
    lv_style_set_bg_color(style, lv_color_hex(0xffffffff));
    lv_style_set_bg_grad_dir(style, LV_GRAD_DIR_VER);
    lv_style_set_text_color(style, lv_color_hex(0xff000000));
    lv_style_set_border_color(style, lv_color_hex(0xff888888));
    lv_style_set_border_side(style, LV_BORDER_SIDE_BOTTOM|LV_BORDER_SIDE_RIGHT);
    lv_style_set_border_width(style, 3);
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_flex_flow(style, LV_FLEX_FLOW_ROW);
    lv_style_set_flex_main_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_text_font(style, &ui_font_source_han_sans_sc_bold_20);
    lv_style_set_pad_column(style, 20);
    lv_style_set_text_letter_space(style, 5);
};

lv_style_t *get_style_style_main_bar_btu_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_main_bar_btu_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_main_bar_btu(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_main_bar_btu_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_main_bar_btu(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_main_bar_btu_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_screen_bottom_panel
//

void init_style_style_screen_bottom_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_align(style, LV_ALIGN_BOTTOM_MID);
    lv_style_set_length(style, 800);
    lv_style_set_flex_grow(style, 2);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_bg_grad_dir(style, LV_GRAD_DIR_VER);
    lv_style_set_bg_color(style, lv_color_hex(0xff001126));
    lv_style_set_bg_grad_color(style, lv_color_hex(0xffd8eaed));
    lv_style_set_radius(style, 0);
    lv_style_set_bg_opa(style, 100);
    lv_style_set_border_width(style, 0);
};

lv_style_t *get_style_style_screen_bottom_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_screen_bottom_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_screen_bottom_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_screen_bottom_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_screen_bottom_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_screen_bottom_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_bar_label
//

void init_style_style_bar_label_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_align(style, LV_ALIGN_CENTER);
    lv_style_set_text_font(style, &ui_font_source_han_sans_sc_bold_20);
    lv_style_set_text_color(style, lv_color_hex(0xffffffff));
};

lv_style_t *get_style_style_bar_label_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_bar_label_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_bar_label(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_bar_label_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_bar_label(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_bar_label_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_member_center_tabview
//

void init_style_style_member_center_tabview_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_text_font(style, &ui_font_source_han_sans_sc_bold_20);
    lv_style_set_bg_opa(style, 100);
    lv_style_set_radius(style, 20);
    lv_style_set_anim_duration(style, 200);
    lv_style_set_clip_corner(style, true);
};

lv_style_t *get_style_style_member_center_tabview_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_member_center_tabview_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_member_center_tabview(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_member_center_tabview_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_member_center_tabview(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_member_center_tabview_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_bar_label_panel
//

void init_style_style_bar_label_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_flex_grow(style, 2);
    lv_style_set_bg_color(style, lv_color_hex(0xff000000));
    lv_style_set_bg_opa(style, 50);
    lv_style_set_align(style, LV_ALIGN_CENTER);
    lv_style_set_border_width(style, 0);
};

lv_style_t *get_style_style_bar_label_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_bar_label_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_bar_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_bar_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_bar_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_bar_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_main_bar_icon
//

void init_style_style_main_bar_icon_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_align(style, LV_ALIGN_CENTER);
    lv_style_set_flex_grow(style, 1);
};

lv_style_t *get_style_style_main_bar_icon_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_main_bar_icon_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_main_bar_icon(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_main_bar_icon_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_main_bar_icon(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_main_bar_icon_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_main_btu_label_panel
//

void init_style_style_main_btu_label_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_bg_opa(style, 0);
    lv_style_set_border_width(style, 0);
    lv_style_set_pad_top(style, 0);
    lv_style_set_pad_bottom(style, 0);
    lv_style_set_pad_left(style, 0);
    lv_style_set_pad_right(style, 0);
    lv_style_set_pad_row(style, 0);
    lv_style_set_pad_column(style, 0);
};

lv_style_t *get_style_style_main_btu_label_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_main_btu_label_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_main_btu_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_main_btu_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_main_btu_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_main_btu_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_screen_top_panel
//

void init_style_style_screen_top_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_flex_grow(style, 1);
    lv_style_set_pad_top(style, 0);
    lv_style_set_pad_bottom(style, 0);
    lv_style_set_pad_left(style, 0);
    lv_style_set_pad_right(style, 0);
    lv_style_set_pad_row(style, 0);
    lv_style_set_pad_column(style, 0);
    lv_style_set_bg_color(style, lv_color_hex(0xffe6e5fc));
    lv_style_set_bg_opa(style, 255);
    lv_style_set_bg_grad_dir(style, LV_GRAD_DIR_VER);
    lv_style_set_bg_grad_color(style, lv_color_hex(0xff001126));
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_flex_flow(style, LV_FLEX_FLOW_ROW);
    lv_style_set_flex_main_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_radius(style, 0);
    lv_style_set_border_width(style, 0);
};

lv_style_t *get_style_style_screen_top_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_screen_top_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_screen_top_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_screen_top_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_screen_top_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_screen_top_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_screen
//

void init_style_style_screen_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_pad_top(style, 0);
    lv_style_set_pad_bottom(style, 0);
    lv_style_set_pad_left(style, 0);
    lv_style_set_pad_right(style, 0);
    lv_style_set_pad_row(style, 0);
    lv_style_set_pad_column(style, 0);
    lv_style_set_bg_image_src(style, &img_blue_bg);
    lv_style_set_bg_image_recolor(style, lv_color_hex(0xffffffff));
    lv_style_set_bg_image_recolor_opa(style, 50);
};

lv_style_t *get_style_style_screen_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_screen_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_screen(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_screen_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_screen(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_screen_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_screen_mid_panel
//

void init_style_style_screen_mid_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_flex_grow(style, 10);
    lv_style_set_pad_top(style, 0);
    lv_style_set_pad_bottom(style, 0);
    lv_style_set_pad_left(style, 0);
    lv_style_set_pad_right(style, 0);
    lv_style_set_pad_row(style, 0);
    lv_style_set_pad_column(style, 0);
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_flex_main_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_bg_opa(style, 0);
    lv_style_set_border_width(style, 0);
    lv_style_set_radius(style, 0);
};

lv_style_t *get_style_style_screen_mid_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_screen_mid_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_screen_mid_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_screen_mid_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_screen_mid_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_screen_mid_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_screen_container
//

void init_style_style_screen_container_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_flex_flow(style, LV_FLEX_FLOW_COLUMN);
    lv_style_set_flex_main_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
};

lv_style_t *get_style_style_screen_container_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_screen_container_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_screen_container(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_screen_container_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_screen_container(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_screen_container_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_main_keyboard
//

void add_style_style_main_keyboard(lv_obj_t *obj) {
    (void)obj;
};

void remove_style_style_main_keyboard(lv_obj_t *obj) {
    (void)obj;
};

//
// Style: style_member_center_label
//

void init_style_style_member_center_label_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_text_font(style, &ui_font_source_han_sans_sc_bold_20);
    lv_style_set_text_letter_space(style, 4);
    lv_style_set_radius(style, 10);
    lv_style_set_text_align(style, LV_TEXT_ALIGN_RIGHT);
};

lv_style_t *get_style_style_member_center_label_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_member_center_label_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_member_center_label(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_member_center_label_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_member_center_label(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_member_center_label_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
// Style: style_member_center_label_panel
//

void init_style_style_member_center_label_panel_MAIN_DEFAULT(lv_style_t *style) {
    lv_style_set_layout(style, LV_LAYOUT_FLEX);
    lv_style_set_flex_main_place(style, LV_FLEX_ALIGN_END);
    lv_style_set_flex_track_place(style, LV_FLEX_ALIGN_CENTER);
    lv_style_set_radius(style, 10);
    lv_style_set_bg_opa(style, 200);
};

lv_style_t *get_style_style_member_center_label_panel_MAIN_DEFAULT() {
    static lv_style_t *style;
    if (!style) {
        style = lv_malloc(sizeof(lv_style_t));
        lv_style_init(style);
        init_style_style_member_center_label_panel_MAIN_DEFAULT(style);
    }
    return style;
};

void add_style_style_member_center_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_add_style(obj, get_style_style_member_center_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

void remove_style_style_member_center_label_panel(lv_obj_t *obj) {
    (void)obj;
    lv_obj_remove_style(obj, get_style_style_member_center_label_panel_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
};

//
//
//

void add_style(lv_obj_t *obj, int32_t styleIndex) {
    typedef void (*AddStyleFunc)(lv_obj_t *obj);
    static const AddStyleFunc add_style_funcs[] = {
        add_style_style_main_bar_btu,
        add_style_style_screen_bottom_panel,
        add_style_style_bar_label,
        add_style_style_member_center_tabview,
        add_style_style_bar_label_panel,
        add_style_style_main_bar_icon,
        add_style_style_main_btu_label_panel,
        add_style_style_screen_top_panel,
        add_style_style_screen,
        add_style_style_screen_mid_panel,
        add_style_style_screen_container,
        add_style_style_main_keyboard,
        add_style_style_member_center_label,
        add_style_style_member_center_label_panel,
    };
    add_style_funcs[styleIndex](obj);
}

void remove_style(lv_obj_t *obj, int32_t styleIndex) {
    typedef void (*RemoveStyleFunc)(lv_obj_t *obj);
    static const RemoveStyleFunc remove_style_funcs[] = {
        remove_style_style_main_bar_btu,
        remove_style_style_screen_bottom_panel,
        remove_style_style_bar_label,
        remove_style_style_member_center_tabview,
        remove_style_style_bar_label_panel,
        remove_style_style_main_bar_icon,
        remove_style_style_main_btu_label_panel,
        remove_style_style_screen_top_panel,
        remove_style_style_screen,
        remove_style_style_screen_mid_panel,
        remove_style_style_screen_container,
        remove_style_style_main_keyboard,
        remove_style_style_member_center_label,
        remove_style_style_member_center_label_panel,
    };
    remove_style_funcs[styleIndex](obj);
}

